<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateSchDescTable extends Migration
{
    /**
     * Run the migrations.
     * 排班详情
     * @return void
     */
    public function up()
    {
        Schema::create('sch_desc', function (Blueprint $table) {
            $table->increments('id');
	        $table->integer('scheduling_id')->comment('排班id');
	        $table->integer('store_id')->comment('店铺id');
	        $table->tinyInteger('station_id')->comment('岗位id');
//	        $table->string('station_name')->comment('岗位名称');
	        $table->tinyInteger('staff_id')->comment('员工id');
//	        $table->string('staff_name',20)->comment('员工名称');
	        $table->Date('time')->comment('排班日期');
	        $table->time('start_time')->comment('排班开始时间');
	        $table->time('end_time')->comment('排班结束时间');
	        $table->time('sign_start')->comment('签到开始时间')->nullable();
	        $table->time('sign_end')->comment('签到结束时间')->nullable();
	        $table->integer('is_settle')->comment('是否结算：1结算，null未结算')->nullable();
	        $table->integer('settle_id')->comment('工单id')->nullable();
	        $table->integer('staff_task_id')->comment('员工任务id')->nullable();
	        $table->integer('company_id')->comment('公司id')->nullable();
	        $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('sch_desc');
    }
}
